package com.example.jenkinsdemo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloCtrl {


    @Value("${app.name:'jenkins'}")
    private String AppName;
    @RequestMapping("/demo")
    public String index(String app){
        return "hello " + (StringUtils.isEmpty(app)? AppName: app);
    }

}
